package com.hxf.dto;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.PolymorphismType;

/**
 * 餐厅优惠
 * 
 * @author tengyicheng
 * 
 */
@Entity
@Table(name = "rk_meal_preferential")
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicInsert = true, dynamicUpdate = true, polymorphism = PolymorphismType.EXPLICIT)
public class MealPreferentialDto extends BaseDto {
	private Integer id;
	private String name;
	private String images;
	private String mealPackage;
	private double costPrice;
	private double preferentialPrice;
	private double discount;
	private String beginDate;
	private String endDate;
	private Integer copies;
	private String explanation;
	private Integer restaurantId;
	private String mealMenuId;
	private Integer preferentialType;//1:餐厅优惠  2:套餐优惠 3:单菜优惠
	private String packageRemark;
	private Integer status;
	private Boolean releaseStatus;
	private Integer feedback;// 评分
	private Integer peopleNum;//消费人次
	
	/**
	 * 本店优惠
	 */
	public static final int PREFERENTIAL_TYPE_0 = 0;
	
	/**
	 * 套餐优惠
	 */
	public static final int PREFERENTIAL_TYPE_1 = 1;
	
	/**
	 * 菜肴优惠
	 */
	public static final int PREFERENTIAL_TYPE_2 = 2;
	

	public MealPreferentialDto() {
	}

	public MealPreferentialDto(String name, String images, String mealPackage,
			double costPrice, double preferentialPrice, double discount,
			String beginDate, String endDate, Integer copies,
			String explanation, Integer restaurantId, String mealMenuId,
			Integer preferentialType, String packageRemark, Integer status) {
		this.name = name;
		this.images = images;
		this.mealPackage = mealPackage;
		this.costPrice = costPrice;
		this.preferentialPrice = preferentialPrice;
		this.discount = discount;
		this.beginDate = beginDate;
		this.endDate = endDate;
		this.copies = copies;
		this.explanation = explanation;
		this.restaurantId = restaurantId;
		this.mealMenuId = mealMenuId;
		this.preferentialType = preferentialType;
		this.packageRemark = packageRemark;
		this.status = status;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "meal_package")
	public String getMealPackage() {
		return mealPackage;
	}

	public void setMealPackage(String mealPackage) {
		this.mealPackage = mealPackage;
	}

	@Column(name = "cost_price")
	public double getCostPrice() {
		return costPrice;
	}

	public void setCostPrice(double costPrice) {
		this.costPrice = costPrice;
	}

	@Column(name = "preferential_price")
	public double getPreferentialPrice() {
		return preferentialPrice;
	}

	public void setPreferentialPrice(double preferentialPrice) {
		this.preferentialPrice = preferentialPrice;
	}

	@Column(name = "discount")
	public double getDiscount() {
		return discount;
	}

	public void setDiscount(double discount) {
		this.discount = discount;
	}

	@Column(name = "begin_date")
	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}

	@Column(name = "end_date")
	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	@Column(name = "copies")
	public Integer getCopies() {
		return copies;
	}

	public void setCopies(Integer copies) {
		this.copies = copies;
	}

	@Column(name = "explanation")
	public String getExplanation() {
		return explanation;
	}

	public void setExplanation(String explanation) {
		this.explanation = explanation;
	}

	@Column(name = "restaurant_id")
	public Integer getRestaurantId() {
		return restaurantId;
	}

	public void setRestaurantId(Integer restaurantId) {
		this.restaurantId = restaurantId;
	}

	@Column(name = "meal_menu_id")
	public String getMealMenuId() {
		return mealMenuId;
	}

	public void setMealMenuId(String mealMenuId) {
		this.mealMenuId = mealMenuId;
	}

	@Column(name = "preferential_type")
	public Integer getPreferentialType() {
		return preferentialType;
	}

	public void setPreferentialType(Integer preferentialType) {
		this.preferentialType = preferentialType;
	}

	@Column(name= "package_remark")
	public String getPackageRemark() {
		return packageRemark;
	}

	public void setPackageRemark(String packageRemark) {
		this.packageRemark = packageRemark;
	}

	@Column(name="images")
	public String getImages() {
		return images;
	}

	public void setImages(String images) {
		this.images = images;
	}

	@Column(name="status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name="release_status")
	public Boolean getReleaseStatus() {
		return releaseStatus;
	}

	public void setReleaseStatus(Boolean releaseStatus) {
		this.releaseStatus = releaseStatus;
	}

	@Column(name="feedback")
	public Integer getFeedback() {
		return feedback;
	}

	public void setFeedback(Integer feedback) {
		this.feedback = feedback;
	}
	
	@Column(name="peopleNum")
	public Integer getPeopleNum() {
		return peopleNum;
	}

	public void setPeopleNum(Integer peopleNum) {
		this.peopleNum = peopleNum;
	}

	@Override
	public String toString() {
		return "MealPreferentialDto [id=" + id + ", name=" + name + ", images="
				+ images + ", mealPackage=" + mealPackage + ", costPrice="
				+ costPrice + ", preferentialPrice=" + preferentialPrice
				+ ", discount=" + discount + ", beginDate=" + beginDate
				+ ", endDate=" + endDate + ", copies=" + copies
				+ ", explanation=" + explanation + ", restaurantId="
				+ restaurantId + ", mealMenuId=" + mealMenuId
				+ ", preferentialType=" + preferentialType + ", packageRemark="
				+ packageRemark + ", status=" + status + ", releaseStatus="
				+ releaseStatus + "]";
	}
	
}
